Skip to content

fix: improve diff viewer render and hunk navigation performance - #16

Merged
flamestro merged 1 commit into
mainfrom
performance_improvements
Jul 4, 2026
Merged

fix: improve diff viewer render and hunk navigation performance#16
flamestro merged 1 commit into
mainfrom
performance_improvements

Conversation

@flamestro

Copy link
Copy Markdown
Owner

What changed

  • Removed full-screen clearing on every terminal redraw.
  • Cached normalized file lines during diff loading for reuse while rendering.
  • Precomputed hunk starts and ranges per file instead of rebuilding them during navigation.

Why

  • Reduce repeated work during scrolling, hunk navigation, and redraws.
  • Let ratatui use incremental rendering more effectively.
  • Improve responsiveness on larger diffs and files.

User-facing impact

  • The UI should feel smoother when scrolling or navigating hunks.
  • No intended behavior changes.

Validation

  • cargo check --locked
  • Manual testing completed (if applicable)

Checklist

  • PR is focused and scoped to one change
  • Docs updated when behavior changes
  • Breaking changes called out (if any)

@flamestro flamestro self-assigned this Jul 4, 2026
@flamestro flamestro changed the title Improve diff viewer render and hunk navigation performance fix: improve diff viewer render and hunk navigation performance Jul 4, 2026
@flamestro
flamestro merged commit fc5b5b2 into main Jul 4, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant